package com.jackiechan.day13;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Test {
    public static void main(String[] args) {
//        showE();
//        showG();
        String str = "djagga";
        System.out.println(str.toCharArray().getClass());
        int[] nums = {1,2,3,4};
        System.out.println(Arrays.toString(nums).getClass());
        System.out.println(String.valueOf(nums[0]).getClass());
    }

    private static void showG() {
        System.out.println("*****使用泛型*****");
        List<Number> list = new ArrayList();
        list.add(100);
        list.add(3.3);
        // <??>约束类型, ??表示数据类型
//        list.add("jackie");
        System.out.println(list);
    }

    private static void showE() {
        System.out.println("*****不用泛型*****");
        List list = new ArrayList();
        list.add(10);
        list.add("jackie");
        list.add(3.2);
        System.out.println(list);
    }

}
